﻿<PageFunction
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib" 
    x:Class="TestVisioCanvas.Pages.ProductDetailsPage"
    x:TypeArguments="sys:String"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d"
    d:DesignHeight="480" d:DesignWidth="640"
    Title="ProductDetailsPage">
    <Grid MouseDown="Grid_MouseDown">        
        <Grid.RowDefinitions>
            <RowDefinition Height=".2*"/>
            <RowDefinition Height=".2*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height=".2*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.6*"/>
            <ColumnDefinition Width="0.4*"/>
        </Grid.ColumnDefinitions>                
        <Image Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Stretch="Uniform" Name="_productImage" 
            Source="{Binding ImagePath}" RenderOptions.BitmapScalingMode="Fant"/>
        <StackPanel Grid.Column="1" Grid.Row="2">
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Width="100" Text="Categoria: " FontSize="16" Grid.Column="0"/>
                <TextBlock Text="{Binding Category}" FontSize="16" Grid.Column="1"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Width="100" Text="Nome: " FontSize="16" Grid.Column="0"/>
                <TextBlock Text="{Binding ProductName}" FontSize="16" Grid.Column="1"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Width="100" Text="Forma: " FontSize="16" Grid.Column="0"/>
                <TextBlock Text="{Binding ProductShape}" FontSize="16" Grid.Column="1"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Width="100" Text="Dimensioni: " FontSize="16" Grid.Column="0"/>
                <TextBlock Text="{Binding Dimensions}" FontSize="16" Grid.Column="1"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Width="100" Text="Materiale: " FontSize="16" Grid.Column="0"/>
                <TextBlock Text="{Binding Material}" FontSize="16" Grid.Column="1"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Width="100" Text="Colore: " FontSize="16" Grid.Column="0"/>
                <Rectangle Width="52" Height="52">
                    <Rectangle.Fill>
                        <SolidColorBrush Color="{Binding Color}"/>
                    </Rectangle.Fill>
                </Rectangle>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Width="100" Text="Prezzo" FontSize="16" Grid.Column="0"/>
                <TextBlock Text="{Binding PriceNoVATStr}" FontSize="16" Grid.Column="1"/>
            </StackPanel>
        </StackPanel>
        <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" 
                MaxHeight="70" MaxWidth="70" Grid.Column="1" Grid.Row="3"
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
                Click="Button_Click" TouchUp="Button_TouchUp">
            <Image Source="/Images/NewIconsL/close.png" RenderOptions.BitmapScalingMode="Fant"/>
        </Button>        
    </Grid>

</PageFunction>
